package com.teach.service.impl;

import java.sql.SQLException;

import com.teach.dao.ConfigDao;
import com.teach.entity.Config;
import com.teach.service.ConfigService;

public class CondigServiceImpl implements ConfigService{

	ConfigDao dao=new ConfigDao();
	@Override
	public int getCount() {
		try {
			int config = dao.SelectByString();
			return config;
		}catch (Exception e) {
			e.printStackTrace();
			return 0;
			
		}
	}

	@Override
	public void saveCount(int count) {
		try {
			dao.UpdateByString(count);
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}

}
